package com.im323.common.util;

import java.text.ParseException;
import java.text.SimpleDateFormat;

public class DateUtil {

	public static long string2Date(String date, String pattern) {
		SimpleDateFormat dateFormat = new SimpleDateFormat(pattern);
		try {
			return dateFormat.parse(date).getTime();
		} catch (ParseException e) {
			e.printStackTrace();
		}
		return 0;
	}

}
